import re
testStrings=["heo","helo","hellllo"]
expressions=["hel?o","hel+o","hel*o"]
for expression in expressions:
    for string in testStrings:
     if re.match(expression,string):
        print(expression,"matches",string)
    else:
       print(expression,"does not match",string)
       print
expression1="elo"
expression2="^elo"
expression3="elo$"
if re.match(expression1,testStrings[1]):
   print(expression1,"matches",testStrings[1])
          
if re.match(expression1,testStrings[1]):
   print(expression1,"found in",testStrings[1])

if re.match(expression2,testStrings[1]):
   print(expression2,"found in",testStrings[1])

if re.match(expression3,testStrings[1]):
   print(expression3,"found in",testStrings[1])
